package cn.com.HiSting1990.MyList;

import java.util.concurrent.ConcurrentHashMap;

public class myConcurrentHashMap {
    public static void main(String[] args) {
        //ConcurrentHashMap 是线程安全的map，它也具有安全失败，不会报出ConcurrentModificationException的错误
        //它的初始化的大小是16个，它的装载因子是0.75F，当存储到16*0.75的大小时，会扩展到原来的2倍
        ConcurrentHashMap<String, String> concurrentHashMap = new ConcurrentHashMap<>();

        concurrentHashMap.put("A","AAA");
        concurrentHashMap.put("B","BBB");

        ConcurrentHashMap<String, String> concurrentHashMap100 = new ConcurrentHashMap<>(1000);

    }
}
